import { memo } from 'react';
import {context} from './Provider'

function Counter03() {
  
  return (
    <context.Consumer>
      {value => {
        console.log('counter05: 使用 Consumer 获取')
        return (
          <button onClick={() => value.setCounter03(value.counter03 + 1)}>
            counter03: {value.counter03}
          </button>
        )
      }}
    </context.Consumer>
    
  )
}

export default memo(Counter03)